<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/bootstrap-3.3.7-dist/css/bootstrap.css">
    <script src="/static/jquery-3.2.1.js"></script>
    <script src="/static/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
</head>
<body>
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
    添加
</button>
{% for question in questionnaire_list %}

    <div class="panel panel-primary">
        <div class="panel-heading">调查问卷列表</div>


        <div class="panel-body">
            <table class="table table-hover">
                <tr>
                    <th>编号</th>
                    <th>调查问卷名称</th>
                    <th>问卷调查班级</th>
                    <th>参与人数</th>
                    <th>问卷选项</th>
                    <th>查看评分</th>
                    <th>操作</th>
                </tr>
                <tr>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ question.title }}</td>
                    <td>{{ question.cls.title }}</td>
                    <td>{{ question_id }}/{{ question.cls.class_num }}</td>
                    <td><a href="/questionnaire/{{ question.id}}">编辑问卷</a></td>
                    <td><a href="">查看评分</a></td>
                    <td>
                        <a href="/del/{{ question.id }}">
                            <button class="btn btn-danger">删除</button>
                        </a>
                    </td>
                </tr>
            </table>
        </div>
    </div>

{% endfor %}
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">添加调查问卷</h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="exampleInputEmail1">调查问卷名称</label>
                        <input type="text" class="form-control" id="exampleInputEmail1" placeholder="text">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">调查问卷班级</label>
                        <input type="text" class="form-control" id="exampleInputPassword1" placeholder="text">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">调查问卷老师</label>
                        <input type="text" class="form-control" id="exampleInputEmail1" placeholder="text">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>